package com.lh.controller;

import com.alibaba.fastjson.JSONObject;
import com.lh.entity.table.CompanyData;
import com.lh.service.CompanyDataService;
import com.lh.utils.Answer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/companyData")
public class CompanyDataController {

    @Autowired
    private CompanyDataService companyDataService;


    @RequestMapping("/addCompanyData")
    public Answer<Object> addCompanyData(@RequestBody CompanyData companyData) {
        return companyDataService.addCompanyData(companyData);
    }

    @RequestMapping("/updateCompanyData")
    public Answer<Object> updateCompanyData(@RequestBody CompanyData companyData) {
        return companyDataService.updateCompanyData(companyData);
    }

    @RequestMapping("/deleteCompanyData")
    public Answer<Object> deleteCompanyData(@RequestBody CompanyData companyData) {
        return companyDataService.deleteCompanyData(companyData);
    }

    @RequestMapping("/queryCompanyDataList")
    public Answer<Object> queryCompanyDataList(@RequestBody CompanyData companyData) {
        return companyDataService.queryCompanyDataList(companyData);
    }

    /**
     *统计分析-高质量发展下-----服务企业下--重点工业企业包保服务查询接口
     */
    @RequestMapping("/queryCompanyDataPage")
    public Answer<Object> queryCompanyDataPage(@RequestBody JSONObject reqJson) {
        return companyDataService.queryCompanyDataPage(reqJson);
    }

    @RequestMapping("/personResponsibleList")
    public Answer<Object> personResponsibleList() {
        return companyDataService.personResponsibleList();
    }

    @RequestMapping("/departmentName")
    public Answer<Object> departmentName() {
        return companyDataService.departmentName();
    }

    @RequestMapping("/redCountDetails")
    public Answer<Object> redCountDetails(@RequestBody JSONObject reqJson) {
        return companyDataService.redCountDetails(reqJson);
    }
}
